<template>
  <div>

<!-- 登录表单 -->
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on"
      label-position="left">
      <!-- 标题栏 -->
      <div class="title-container">
        <!-- 标题 -->
        <h3 class="title">P2P信贷平台管理系统</h3>
      </div>

      <!-- 用户名输入框 -->
      <el-form-item prop="username">
        <!-- svg图标 -->
        <span class="svg-container">
          <svg-icon icon-class="user" />
        </span>
        <!-- 用户名输入框 -->
        <el-input ref="username" v-model="loginForm.username" placeholder="Username" name="username" type="text"
          tabindex="1" auto-complete="on" />
      </el-form-item>

      <!-- 密码输入框 -->
      <el-form-item prop="password">
        <!-- svg图标 -->
        <span class="svg-container">
          <svg-icon icon-class="password" />
        </span>
        <!-- 密码输入框 -->
        <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
          placeholder="Password" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
        <!-- 显示/隐藏密码按钮 -->
        <span class="show-pwd" @click="showPwd">
          <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
        </span>
      </el-form-item>

      <!-- 登录按钮 -->
      <el-button :loading="loading" type="primary" style="width: 100%; margin-bottom: 30px"
        @click.native.prevent="handleLogin">Login</el-button>

      <!-- 登录提示信息 -->
      <div class="tips">
        <!-- 用户名：admin -->
        <span style="margin-right: 20px">username: admin</span>
        <!-- 密码：any -->
        <span> password: any</span>
      </div>
    </el-form>

  </div>
</template>

<script>
export default {

}
</script>

<style>

</style>